package worst.shopping;

import database.DataBaseHelper;
import android.app.Application;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class WorstShoppingApplication extends Application {

	public DataBaseHelper _databaseAdapter;
	
	@Override
	public void onCreate() {
		super.onCreate(); 
	
		DEFAULT_PRODUCT_IMAGE = BitmapFactory.decodeResource(getResources(), R.drawable.default_product_image);
		
		_databaseAdapter = new DataBaseHelper(getApplicationContext());
		_databaseAdapter.open();
		
	}
	
	@Override
	public void onTerminate() {
		_databaseAdapter.close();
		super.onTerminate();
	}
	
	public static Bitmap DEFAULT_PRODUCT_IMAGE;
}
